set_sound_storage

This function sets the location of the pack file in which the engine will look for sound files loaded through the sound object.

bool set_sound_storage(string filename)

Parameters:
filename
The pack file to use. This can be either an absolute path, a relative path, the file name on its own, or a * (see remarks).

Return value:
true on success, false on failure.

Remarks:
Note that both \ and / can be used to specify paths.

If an empty string is passed to this function, the engine will not look for sounds in a pack file but will attempt to locate requested files on disk instead. This is the default behavior.

If you pass * to this function, the engine will attempt to look for sounds in a pack file that has been included into the program itself. For more information on how this is done, see the tutorial on packaging files with your executable.

It is perfectly legal to call this function more than once in your game. Sounds that are already loaded will not be affected, any changes are only seen the next time you attempt to load a sound.

Example:
// Tell the engine to look for sound files in a file called sounds.dat.

void main()
{
set_sound_storage("sounds.dat");
}